package com.bwie.bwedu.presenter.impl;

import com.bwie.bwedu.bean.Student;
import com.bwie.bwedu.fragment.TrackFragmen;
import com.bwie.bwedu.model.TrackModel;
import com.bwie.bwedu.model.impl.TrackModelImpl;
import com.bwie.bwedu.presenter.TackPresenter;

import java.util.ArrayList;

/**
 * Created by Administrator on 2016/7/22.
 */

public class TrackPresenterImpl implements TackPresenter {
    private TrackFragmen fragment;
    private final TrackModelImpl model;

    public TrackPresenterImpl(TrackFragmen fragment) {
        this.fragment = fragment;
        model = new TrackModelImpl();
    }
    @Override
    public void tack(String flag,String pn ) {
        model.tack(flag,pn,  new TrackModel.TackListener() {


            @Override
            public void onTackSuccess(ArrayList<Student> list) {
                fragment.onSuccess(list);
            }

            @Override
            public void onTackFail(String fail) {
                fragment.onFail(fail);
            }
        });
    }

}
